﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAP.Middleware.Connector;

namespace DataTier
{
    public class SapConfig : IDestinationConfiguration
    {
        private static SapConfig _instance = null;

        public bool ChangeEventsSupported()
        {
            return false;
        }

        public static SapConfig Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new SapConfig();
                }

                return _instance;
            }
        }

        public event RfcDestinationManager.ConfigurationChangeHandler ConfigurationChanged;

        public RfcConfigParameters GetParameters(string destinationName)
        {
            RfcConfigParameters config = new RfcConfigParameters();

            config.Add(RfcConfigParameters.Name, destinationName);
            config.Add(RfcConfigParameters.AppServerHost, "sapdev");
            config.Add(RfcConfigParameters.SystemNumber, "00");
            config.Add(RfcConfigParameters.SystemID, "DEV");
            config.Add(RfcConfigParameters.User, "thomasm");
            config.Add(RfcConfigParameters.Password, "expenses");
            config.Add(RfcConfigParameters.Client, "320");
            config.Add(RfcConfigParameters.Language, "EN");

            return config;

        }
    }



}
